home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
LOGIC Apps
/
Logic-APPLE_II_APPS.iso
/
pc
/
LOGIC Apple II 5.25" Library - DOS Part 2
/
DOS031.dsk
/
GORD'S APPLE PLAYER.bas
< prev
next >
Wrap
BASIC Source File
|
2012-02-16
|
5KB
|
141 lines
1 GOSUB 3000
10 DIM A%(44)
20 FOR I = 1 TO 10: READ A%(I)
30 DATA 108,0,242,215,0,181,161,144,0,121
40 NEXT
50 FOR I = 11 TO 17:A%(I) = 0: NEXT
60 FOR I = 18 TO 44: READ A%(I)
70 DATA 0,64,76,81,203,72,0,60,128,54,0,0,51,57,114,102,255,192,90,171,136,68,228,85,152,96,48
80 NEXT
90 GOSUB 200
100 X = PEEK( -16384)
110 IF X <128 THEN 100
120 POKE -16368,0
130 IF X = 172 THEN X = 219
135 IF X = 155 THEN HOME : END
140 IF X <176 THEN 100
150 I = X -175: IF A%(I) = 0 THEN 100
160 POKE 768,A%(I): CALL 770
170 FOR I = 1 TO 20: NEXT : GOTO 100
200 MG$ = "PRESS <RETURN> TO CONTINUE"
210 PR$ = "060A120P180P240L300E038P098L158A218Y278E338R"
215 HOME
220 FOR I = 1 TO 44 STEP 4
230 H = VAL( MID$ (PR$,I,2))
240 V = VAL( MID$ (PR$,I +2,1)) +1
250 C$ = MID$ (PR$,I +3,1)
260 GOSUB 1000
270 NEXT
272 VTAB 17: HTAB 12: PRINT "PIANO SIMULATOR"
275 VTAB 19: HTAB 19: PRINT "BY"
280 VTAB 21: HTAB 6: PRINT "GORDON EASTMAN OF APPLE-CAN"
290 VTAB 23: HTAB 7: PRINT MG$
292 POKE -16368,0
295 IF PEEK( -16384) < >141 THEN 295
300 HOME : VTAB 4
302 PRINT TAB( 14);"DESCRIPTION"
305 PRINT TAB( 14);"-----------"
307 PRINT " ": PRINT " "
310 PRINT " THIS PROGRAM ALLOWS YOU TO USE THE"
320 PRINT "APPLE KEYBOARD AS A PIANO."
325 PRINT " "
330 PRINT " THE 'PIANO' HAS A 2 1/2 OCTAVE RANGE"
340 PRINT "STARTING AT MIDDLE C. EACH OF THE NOTES"
350 PRINT "IS PRODUCED BY STRIKING A PARTICULAR "
360 PRINT "KEY. THE NOTE IS THEN HELD UNTIL THE"
370 PRINT "NEXT KEY IS DEPRESSED. RESTS MAY BE "
380 PRINT "INSERTED BY USING THE SPACE BAR OR ANY"
390 PRINT "NON-CONTROL KEY NOT PRODUCING A"
395 PRINT "NOTE."
400 PRINT " ": PRINT "": PRINT " "
405 HTAB 6
410 PRINT " PRESS <RETURN> TO BEGIN "
415 POKE -16368,0
420 IF PEEK( -16384) < >141 THEN 420
500 DATA 1,0,1,0,1,1,0,1,0,1,0,1,1,0,1,0,1,1,0,1,0,1,0,1,1,0,1,0,1,1
502 HOME : VTAB 3
505 PRINT TAB( 10);"A P P L E P L A Y E R"
510 INVERSE
520 FOR I = 1 TO 30: READ T
530 IF T = 1 THEN ST = 8
540 IF T = 0 THEN ST = 13
550 FOR J = ST TO 15
560 HTAB I +5: VTAB J: PRINT " "
570 NEXT
580 NEXT
590 DATA 1,"Q",3,"W",5,"E",6,"R",8,"T",10,"Y",12,"U",13,"I",15,"O",17,"P",18,"Z",20,"X",22,"C",24,"V",25,"B",27,"N",29,"M",30,","
600 DATA 2,"2",4,"3",7,"5",9,"6", 11,"7",14,"9",16,"0",19,"S",21,"D",23,"F",26,"H",28,"J"
610 N = 18:V = 14
620 FOR I = 1 TO 2
630 FOR J = 1 TO N
640 VTAB V
650 READ T: HTAB T +5
660 READ A$: PRINT A$
670 NEXT
680 NORMAL :V = 10:N = 12
690 NEXT
700 VTAB 20: HTAB 11: PRINT "PRESS <ESC> TO END"
710 RETURN
1000 IF FT = 0 THEN GOSUB 2000
1010 FT = 1:BL$ = " "
1020 LQ = LEN(CS$)
1030 FOR Q = 1 TO LQ: IF MID$ (CS$,Q,1) = C$ THEN GOTO 1050
1040 NEXT
1050 IF Q >LQ THEN PRINT C$;" NOT FOUND IN BLOCK CHAR SET": RETURN
1060 INVERSE :LQ = LEN(QX$(Q))
1070 FOR LZ = 1 TO LQ STEP 4
1080 VF = ( MID$ (QX$(Q),LZ,1) = "V")
1090 HF = ( MID$ (QX$(Q),LZ,1) = "H")
1100 HT = VAL( MID$ (QX$(Q),LZ +1,1)) +H
1110 VT = VAL( MID$ (QX$(Q),LZ +2,1)) +V
1120 VZ = VAL( MID$ (QX$(Q),LZ +3,1))
1130 FOR PQ = 1 TO VZ
1140 HTAB HT: VTAB VT: PRINT BL$
1150 HT = HT +HF:VT = VT +VF
1160 NEXT
1170 NEXT
1180 NORMAL : RETURN
2000 CS$ = "ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890"
2010 DIM QX$( LEN(CS$))
2020 QX$(1) = "H201H113V025V425H143"
2030 QX$(2) = "V007H103H133H163V412V442"
2040 QX$(3) = "V015H103H163V411V451"
2050 QX$(4) = "V007H103H163V415"
2060 QX$(5) = "V007H104H132H164"
2070 QX$(6) = "V007H104H132"
2080 QX$(7) = "V015H103H411H233V442H163"
2090 QX$(8) = "V007V407H133"
2100 QX$(9) = "H103V215H163"
2110 QX$(10) = "V406H163V042"
2120 QX$(11) = "V007H131H221H241H311H351H401H461"
2130 QX$(12) = "V007H164"
2140 QX$(13) = "V007H111H221H311V407"
2150 QX$(14) = "V007H111V223H351V407"
2160 QX$(15) = "V015H103H163V415"
2170 QX$(16) = "V007H103H133V412"
2180 QX$(17) = "V015H103H164V415H241H351"
2190 QX$(18) = "V007H103H133V412H241H351H461"
2200 QX$(19) = "H103V012H411H133V442H163H051"
2210 QX$(20) = "H005V216"
2220 QX$(21) = "V006V406H163"
2230 QX$(22) = "V005V405V151V261V351"
2240 QX$(23) = "V006H161V233H361V406"
2250 QX$(24) = "V002V052V121V141V231V321V341V402V452"
2260 QX$(25) = "V002V121V234V321V402"
2270 QX$(26) = "H004V402V321V231V141V052H164"
2280 QX$(27) = "H111V206H163"
2290 QX$(28) = "H011H103V412H232H141V052H164"
2300 QX$(29) = "H004V402V322V231V442H163H051"
2310 QX$(30) = "V307H144V032V121V211"
2320 QX$(31) = "H005V013H133V442H163H051"
2330 QX$(32) = "H103V411V015H133V442H163"
2340 QX$(33) = "H004V402V321V231V143"
2350 QX$(34) = "H103H133H163V012V042V412V442"
2360 QX$(35) = "H104V012H133V416"
2370 QX$(36) = "H103H163V015V415V141V231V321
2380 RETURN
3000 POKE 770,173: POKE 771,48: POKE 772,192: POKE 773,136: POKE 774,208: POKE 775,8: POKE 776,173: POKE 777,0: POKE 778,192: POKE 779,205: POKE 780,1: POKE 781,3
3010 POKE 769,127
3020 POKE 782,208: POKE 783,9: POKE 784,202: POKE 785,208: POKE 786,242: POKE 787,174: POKE 788,0: POKE 789,3: POKE 790,76: POKE 791,2: POKE 792,3: POKE 793,96
3030 POKE 782,16
3040 RETURN